using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CommonParameterPanel : ShipUIParameterPanel
{
    public InputField m_NameEdit;
    public Text m_IDText;
    public Toggle m_ShowJustOnAndroid;

    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {

    }
    public override void OnSelected(ShipUI shipUI)
    {
        base.OnSelected(shipUI);
        if (shipUI == null)
            return;

        m_NameEdit.text = shipUI.uiName;
        m_IDText.text = shipUI.id.ToString();
        m_ShowJustOnAndroid.isOn = shipUI.shipUIData.m_ShowJustInAndroid;
    }
    public void OnNameEditFinished()
    {
        if (m_ShipUI == null)
            return;
        m_ShipUI.uiName = m_NameEdit.text;
    }
    public void OnShowJustOnAndroidBeChanged(bool value)
    {
        m_ShipUI.shipUIData.m_ShowJustInAndroid = value ;
    }
}
